package com.film.test;

import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.film.Film;

public class Demo {
	/**
	 * set方法注入
	 */
	@Test
	public void test1() {
		BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml");
		Film film = (Film) factory.getBean("film");
		film.play();
	}
}
